package com.rd.student.jike.class2.lihongming.week724_730.S728;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Collections;
import java.util.LinkedList;
import java.util.Scanner;

/**
 * @Auther:Heinrich
 * @Date:2023/7/28-07-28-16:33
 * @Description:c230728.NameRandom
 * @version:1.0
 */
public class Module2 {
    public static void main(String[] args)throws Exception {
        Scanner scanner = new Scanner(System.in);
        System.out.println(randomName(scanner.nextInt()));
    }

    public static LinkedList<String> randomName(int n) throws Exception{
        File file = new File("all.txt");
        InputStream is = new FileInputStream(file);
        byte[] byteArr = new byte[(int) file.length()];
        is.read(byteArr);
        LinkedList arr = new LinkedList();
        String names = new String(byteArr);
        int a=0,b;
        for (int i = 0; i < names.length(); i++) {
            if(names.charAt(i)=='、'){
                b=i;
                String name = names.substring(a,b);
                a=i+1;
                arr.add(name);
            }
        }
        Collections.shuffle(arr);
        LinkedList<String> list = new LinkedList<>();
        for (int i = 0; i < n; i++) {
            list.add((String) arr.get(i));
        }
        //System.out.println();
        is.close();
    return list;
    }
}
